<template>
  <div class="home_news">
    <div class="home_news_left">
      <img class="home_news_left_img" src="/images/nrh_message.png" alt="">
    </div>
    <div>
      <van-swipe class="home_news_swipe" :show-indicators="false" :autoplay="3000" vertical>
        <van-swipe-item v-for="(item,index) in messageList" :key="index">{{ item.message_text }}</van-swipe-item>
        <van-swipe-item v-if="messageList.length === 0">暂无数据</van-swipe-item>

      </van-swipe>
    </div>
    <div class="home_center" />
  </div>
</template>
<script>
export default {
  name: 'HomeNews',
  props: {
    messageList: {
      type: Array,
      default: () => {
        return []
      }
    }
  }
}
</script>

<style lang="scss">
.home{
    &_news{
        display: flex;
        flex-direction: row;
        height: 50px ;
        background-color: #fff;
        &_swipe{
        flex: 1;
        height: 50px ;
        }
        .van-swipe-item{
        display: flex;
        align-items: center;
        height: 50px!important;
        }
        &_left{
        margin-top: 17px;
        margin-right: 16px;
        margin-left: 15px;
        position: relative;
        &_img{
            width: 68px;
            height: 17px;
        }

        }
    }
}

</style>
